class CreatePurchaseItems < ActiveRecord::Migration
  def change
    create_table :purchase_items do |t|
      t.references :purchase
      t.string :product_id
      t.integer :quantity
      t.float :price

      t.timestamps
    end
    add_index :purchase_items, :purchase_id
  end
end
